// import axios from "axios";
// import scAxios from "@sc/request";
// axios.defaults.headers.common['token'] = 'da1530666d38427fa20e757e05ad829f';
// axios.defaults.headers.post['Content-Type'] = 'application/json';
// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';

// export default function request(url, option) {
//   return scAxios(url, option).then(response => {
//     const { code, msg, data } = response
//     // console.log(`request------->`,response)
//     return Promise.resolve({ msg, data, code })
//   }).catch(error => {
//     const { response } = error
//     let msg
//     let statusCode
//     if (response && response instanceof Object) {
//       const { data, statusText } = response
//       statusCode = response.status
//       msg = data.message || statusText
//     } else {
//       statusCode = 600
//       msg = error.message || 'Network Error'
//     }

//     /* eslint-disable */
//     return Promise.resolve({ success: false, statusCode, message: msg })
//     // return response
//   });
// }